package com.example.photongrid;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;

public class OptionServer extends Activity {

	protected void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setContentView(R.layout.networking);
		Button b1 =(Button)findViewById(R.id.b1);
		Button b2 =(Button)findViewById(R.id.b2);
		b1.setOnClickListener(buttonhandler);
		b2.setOnClickListener(buttonhandler);   
	}
	View.OnClickListener buttonhandler=new View.OnClickListener() { 

		public void onClick(View v) {
			switch(v.getId()) { 
			case R.id.b1:   
				Intent myIntent1 = new Intent(OptionServer.this, HostGameActivity.class);
				OptionServer.this.startActivity(myIntent1);
				break;  

			case R.id.b2:  
				Intent myIntent2 = new Intent(OptionServer.this, JoinGame.class);
				OptionServer.this.startActivity(myIntent2);
				break;  
			} 
		} 
	};

	

}
